<!DOCTYPE html>
<html lang="en-US">
<!--********************************************-->
<!--*       Generated from PreTeXt source      *-->
<!--*                                          *-->
<!--*         https://pretextbook.org          *-->
<!--*                                          *-->
<!--********************************************-->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="robots" content="noindex, nofollow">
</head>
<body class="ignore-math">
<h3 class="heading"><span class="type">Paragraph</span></h3>
<p>Find the Fourier series for a periodic function <span class="process-math">\(f(x)\)</span> with period <span class="process-math">\(4\)</span></p>
<div class="displaymath process-math" data-contains-math-knowls="">
\begin{equation*}
f(x)=\left\{\begin{array}{rl}0, &amp; \text{if~} -2&lt;x&lt;-1\\
K,  &amp; \text{if~} -1&lt;x&lt;1\\
0,&amp; \text{if~} 1&lt;x&lt;2\end{array}\right.,\qquad f(x+4)=f(x).
\end{equation*}
</div>
<p class="continuation">We use the Euler-Fourier formulas with <span class="process-math">\(L = 4/2=2\text{:}\)</span></p>
<div class="displaymath process-math" data-contains-math-knowls="">
\begin{equation*}
a_0=\frac{1}{2}\int_{-2}^{2} f(x)~ \textrm{d}x=\frac{1}{2}\cdot2\cdot\int_{0}^{1} K ~\textrm{d}x=K.
\end{equation*}
</div>
<p class="continuation">(or, <span class="process-math">\(f (x)\)</span> is even. Integrating <span class="process-math">\(f\)</span> over a period, one get twice of the integration over half of a period.)For <span class="process-math">\(n \geq 1\text{,}\)</span> we have</p>
<div class="displaymath process-math" data-contains-math-knowls="">
\begin{equation*}
\qquad\qquad\begin{aligned} a_n &amp;= \frac{1}{2}\int_{-2}^{2} f(x)\cos\frac{n\pi x}{2}\textrm{d}x\\
&amp;= \int_{0}^{2} f(x)\cos\frac{n\pi x}{2} \textrm{d}x\\
&amp;= \frac{2K}{n\pi}\sin\frac{n\pi x}{2}\Big|_{0}^{1}=\frac{2K}{n\pi}\sin\frac{n\pi}{2}.\end{aligned} \quad\text{i.e. } a_n=\left\{\begin{array}{ll}0, &amp; n\text{ even}\\
\frac{2K}{n\pi},&amp; n=1,5,9,\cdots\\
-\frac{2K}{n\pi}, &amp; n=3,7,11,\cdots .\end{array}\right.
\end{equation*}
</div>
<p class="continuation">(Both <span class="process-math">\(f (x)\)</span> and <span class="process-math">\(\cos\frac{n\pi x}{2}\)</span> are even. Then, the product <span class="process-math">\(f (x)\cos\frac{n\pi x}{2}\)</span> is even.)</p>
<div class="displaymath process-math" data-contains-math-knowls="">
\begin{equation*}
b_n = \frac{1}{2}\int_{-2}^{2} f(x)\sin\frac{n\pi x}{2}\textrm{d}x=0.
\end{equation*}
</div>
<p class="continuation">(The product <span class="process-math">\(f (x)\sin\frac{n\pi x}{2}\)</span> is odd.)The Fourier series is</p>
<div class="displaymath process-math" data-contains-math-knowls="">
\begin{equation*}
f(x)=\frac{K}{2}+\frac{2K}{\pi}\left[\cos\frac{\pi x}{2}-\frac{1}{3}\cos\frac{3\pi x}{2} +\frac{1}{5}\cos\frac{5\pi x}{2} -\frac{1}{7} \cos\frac{7\pi x}{2}+\cdots\right].
\end{equation*}
</div>
<span class="incontext"><a href="sec7_3.html#p-344" class="internal">in-context</a></span>
</body>
</html>
